package cn.home.sysmanagement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.home.sysmanagement.mapper.HomeNoticeMapper;
import cn.home.sysmanagement.domain.HomeNotice;
import cn.home.sysmanagement.service.IHomeNoticeService;

/**
 * 协议Service业务层处理
 * 
 * @author homedoctor
 * @date 2025-04-09
 */
@Service
public class HomeNoticeServiceImpl implements IHomeNoticeService 
{
    @Autowired
    private HomeNoticeMapper homeNoticeMapper;

    /**
     * 查询协议
     * 
     * @param id 协议主键
     * @return 协议
     */
    @Override
    public HomeNotice selectHomeNoticeById(Long id)
    {
        return homeNoticeMapper.selectHomeNoticeById(id);
    }

    /**
     * 查询协议列表
     * 
     * @param homeNotice 协议
     * @return 协议
     */
    @Override
    public List<HomeNotice> selectHomeNoticeList(HomeNotice homeNotice)
    {
        return homeNoticeMapper.selectHomeNoticeList(homeNotice);
    }

    /**
     * 新增协议
     * 
     * @param homeNotice 协议
     * @return 结果
     */
    @Override
    public int insertHomeNotice(HomeNotice homeNotice)
    {
        return homeNoticeMapper.insertHomeNotice(homeNotice);
    }

    /**
     * 修改协议
     * 
     * @param homeNotice 协议
     * @return 结果
     */
    @Override
    public int updateHomeNotice(HomeNotice homeNotice)
    {
        return homeNoticeMapper.updateHomeNotice(homeNotice);
    }

    /**
     * 批量删除协议
     * 
     * @param ids 需要删除的协议主键
     * @return 结果
     */
    @Override
    public int deleteHomeNoticeByIds(Long[] ids)
    {
        return homeNoticeMapper.deleteHomeNoticeByIds(ids);
    }

    /**
     * 删除协议信息
     * 
     * @param id 协议主键
     * @return 结果
     */
    @Override
    public int deleteHomeNoticeById(Long id)
    {
        return homeNoticeMapper.deleteHomeNoticeById(id);
    }
}
